package com.margo.project.redis.atomic.confige;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.support.atomic.RedisAtomicInteger;

@Configuration
public class RedisSequenceConfiguration {
	
	@Autowired
	private RedisConnectionFactory factory;
	
	@Bean
	public RedisAtomicInteger RedisAtomicInteger() {
		return new RedisAtomicInteger("margoKey", factory);
	}
}
